﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAL_Class
{
    public class Doitac
    {
        NLLDataContext db = new NLLDataContext();
        public string AddNewPartner(string imglink,string banlink) 
        {
           
                string result = string.Empty;
                try
                {
                var a = db.sp_Partner_AddNew(imglink, banlink);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                return result = "Thêm mới thành công";
           
        }
        public string UpdatePartner(int id, string imglink, string banlink)
        {
            string result = string.Empty;
            try
            {
                
                var a = db.sp_Partner_Update(id, imglink, banlink);
               ;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return result = "Chỉnh Sửa thành công";
        }
        public void DeletePartner(int id)
        {try{
            var a = db.sp_Partner_Delete(id);
               }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
